//
//  TLHistoryListTableViewCell.m
//  WXReader
//
//  Created by huaya on 2025/3/29.
//  Copyright © 2025 Andrew. All rights reserved.
//

#import "TLHistoryListTableViewCell.h"

@interface TLHistoryListTableViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property (weak, nonatomic) IBOutlet UILabel *titleLab;
@property (weak, nonatomic) IBOutlet UILabel *lastReadLab;
@property (weak, nonatomic) IBOutlet UILabel *updateTimeLab;
@property (weak, nonatomic) IBOutlet UILabel *lastUpdateTitleLab;
@property (weak, nonatomic) IBOutlet UIButton *continueBtn;

@end

@implementation TLHistoryListTableViewCell
- (IBAction)continueAction:(id)sender {
}

- (void)awakeFromNib {
    [super awakeFromNib];
    
    _imgView.layer.cornerRadius = 8;
    
    _continueBtn.layer.masksToBounds = YES;
    
    _continueBtn.layer.cornerRadius = 12;
    
}
- (void)setDataModel:(TL_ProductionModel *)dataModel{
    if (dataModel) {
        _dataModel = dataModel;
        
        [_imgView sd_setImageWithURL:[NSURL URLWithString:dataModel.cover]];
        
        _titleLab.text = dataModel.name;
        
        _lastReadLab.text = dataModel.last_chapter;
        
        _updateTimeLab.text = [NSDate convert2LocalTimeWithString:dataModel.last_chapter_time andWithFormatter:@"yyyy-MM-dd HH:mm"];
        
        _lastUpdateTitleLab.text = dataModel.record_title;
        
    }
}

@end
